WPS Office.apk(点击下载) / aaef.java


package defpackage;

import com.mopub.nativeads.MoPubNativeAdPositioning;
import java.io.IOException;
import java.io.PrintStream;

/* renamed from: aaef  reason: default package */
public final class aaef implements aaee {
    static final long[] BSM = {0, 0, -1, -1};
    static final int[] BSN = new int[0];
    public static final String[] BSO = {"", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null};
    public static final String[] BSP = {"DEFAULT", "INCOMMENT", "NESTED_COMMENT", "INQUOTEDSTRING"};
    public static final int[] BSQ = {-1, 1, 0, 2, -1, -1, -1, -1, -1, 3, -1, -1, -1, 0, -1, -1, -1, -1};
    static final long[] BSR = {63489};
    static final long[] BSS = {1022};
    static final long[] BSU = {1024};
    int BSK;
    public PrintStream BSL;
    private final int[] BSW;
    private final int[] BSX;
    StringBuffer BSY;
    int BSZ;
    int BTa;
    protected char BTb;
    int BTc;
    int BTd;
    int BTe;
    int BTf;
    int BTg;
    int BTh;
    protected aaec BUr;

    public aaef(aaec aaec) {
        this.BSL = System.out;
        this.BSW = new int[6];
        this.BSX = new int[12];
        this.BTc = 0;
        this.BTd = 0;
        this.BUr = aaec;
    }

    public aaef(aaec aaec, int i) {
        this(aaec);
        axq(i);
    }

    private final void axp(int i) {
        if (this.BSW[i] != this.BTf) {
            int[] iArr = this.BSX;
            int i2 = this.BTe;
            this.BTe = i2 + 1;
            iArr[i2] = i;
            this.BSW[i] = this.BTf;
        }
    }

    private void axq(int i) {
        if (i >= 4 || i < 0) {
            throw new aaeh("Error: Ignoring invalid lexical state : " + i + ". State unchanged.", 2);
        }
        this.BTc = i;
    }

    private final void gUB() {
        this.BTf = -2147483647;
        int i = 6;
        while (true) {
            int i2 = i - 1;
            if (i > 0) {
                this.BSW[i2] = Integer.MIN_VALUE;
                i = i2;
            } else {
                return;
            }
        }
    }

    private aaeg gUT() {
        int i = this.BTh;
        aaeg aaeg = new aaeg();
        aaeg.BTv = this.BTh;
        String str = BSO[this.BTh];
        if (str == null) {
            str = this.BUr.gUI();
        }
        aaeg.image = str;
        aaeg.BTw = this.BUr.gUH();
        aaeg.BTx = this.BUr.gUG();
        aaeg.BTy = this.BUr.gUF();
        aaeg.BTz = this.BUr.gUE();
        return aaeg;
    }

    private final int nu(int i, int i2) {
        this.BTh = i2;
        this.BTg = 0;
        return 1;
    }

    private final int nv(int i, int i2) {
        int i3 = 0;
        this.BTe = 2;
        int i4 = 1;
        this.BSX[0] = 2;
        int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
        while (true) {
            int i6 = this.BTf + 1;
            this.BTf = i6;
            if (i6 == Integer.MAX_VALUE) {
                gUB();
            }
            if (this.BTb < '@') {
                long j = 1 << this.BTb;
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((4294977024L & j) != 0) {
                                i5 = 14;
                                axp(0);
                                continue;
                            } else {
                                continue;
                            }
                        case 1:
                            if ((-1120986473985L & j) != 0) {
                                i5 = 15;
                                axp(1);
                                continue;
                            } else {
                                continue;
                            }
                        case 2:
                            if ((-1120986473985L & j) != 0) {
                                if (i5 > 15) {
                                    i5 = 15;
                                }
                                axp(1);
                                continue;
                            } else if ((4294977024L & j) == 0) {
                                continue;
                            } else {
                                if (i5 > 14) {
                                    i5 = 14;
                                }
                                axp(0);
                                continue;
                            }
                    }
                } while (i4 != i3);
            } else if (this.BTb < 128) {
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 1:
                        case 2:
                            i5 = 15;
                            axp(1);
                            continue;
                    }
                } while (i4 != i3);
            } else {
                int i7 = (this.BTb & 255) >> 6;
                long j2 = 1 << (this.BTb & '?');
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 1:
                        case 2:
                            if ((BSM[i7] & j2) == 0) {
                                continue;
                            } else {
                                if (i5 > 15) {
                                    i5 = 15;
                                }
                                axp(1);
                                continue;
                            }
                    }
                } while (i4 != i3);
            }
            if (i5 != Integer.MAX_VALUE) {
                this.BTh = i5;
                this.BTg = i2;
                i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
            }
            i2++;
            i4 = this.BTe;
            this.BTe = i3;
            i3 = 2 - i3;
            if (i4 != i3) {
                try {
                    this.BTb = this.BUr.readChar();
                } catch (IOException e) {
                }
            }
            return i2;
        }
    }

    private final int nw(int i, int i2) {
        this.BTe = 1;
        this.BSX[0] = 0;
        int i3 = 0;
        int i4 = 1;
        int i5 = Integer.MAX_VALUE;
        while (true) {
            int i6 = this.BTf + 1;
            this.BTf = i6;
            if (i6 == Integer.MAX_VALUE) {
                gUB();
            }
            if (this.BTb < '@') {
                long j = 1 << this.BTb;
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((-3298534883329L & j) != 0) {
                                i5 = 4;
                                continue;
                            } else {
                                continue;
                            }
                    }
                } while (i4 != i3);
            } else if (this.BTb < 128) {
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            i5 = 4;
                            continue;
                    }
                } while (i4 != i3);
            } else {
                int i7 = (this.BTb & 255) >> 6;
                long j2 = 1 << (this.BTb & '?');
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((BSM[i7] & j2) != 0 && i5 > 4) {
                                i5 = 4;
                                continue;
                            }
                    }
                } while (i4 != i3);
            }
            if (i5 != Integer.MAX_VALUE) {
                this.BTh = i5;
                this.BTg = i2;
                i5 = Integer.MAX_VALUE;
            }
            i2++;
            i4 = this.BTe;
            this.BTe = i3;
            i3 = 1 - i3;
            if (i4 != i3) {
                try {
                    this.BTb = this.BUr.readChar();
                } catch (IOException e) {
                }
            }
            return i2;
        }
    }

    private final int nx(int i, int i2) {
        int i3 = 0;
        this.BTe = 6;
        int i4 = 1;
        this.BSX[0] = 0;
        int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
        while (true) {
            int i6 = this.BTf + 1;
            this.BTf = i6;
            if (i6 == Integer.MAX_VALUE) {
                gUB();
            }
            if (this.BTb < '@') {
                long j = 1 << this.BTb;
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((-17179877377L & j) != 0) {
                                if (i5 > 11) {
                                    i5 = 11;
                                }
                                axp(2);
                                continue;
                            } else if (this.BTb == '\r') {
                                int[] iArr = this.BSX;
                                int i7 = this.BTe;
                                this.BTe = i7 + 1;
                                iArr[i7] = 3;
                                continue;
                            } else {
                                continue;
                            }
                        case 1:
                            if (i5 > 10) {
                                i5 = 10;
                            }
                            int[] iArr2 = this.BSX;
                            int i8 = this.BTe;
                            this.BTe = i8 + 1;
                            iArr2[i8] = 1;
                            continue;
                        case 2:
                            if ((-17179877377L & j) == 0) {
                                continue;
                            } else {
                                if (i5 > 11) {
                                    i5 = 11;
                                }
                                axp(2);
                                continue;
                            }
                        case 3:
                            if (this.BTb != '\n') {
                                continue;
                            } else {
                                if (i5 > 12) {
                                    i5 = 12;
                                }
                                axp(4);
                                continue;
                            }
                        case 4:
                            if ((4294967808L & j) == 0) {
                                continue;
                            } else {
                                if (i5 > 12) {
                                    i5 = 12;
                                }
                                axp(4);
                                continue;
                            }
                        case 5:
                            if (this.BTb == '\r') {
                                int[] iArr3 = this.BSX;
                                int i9 = this.BTe;
                                this.BTe = i9 + 1;
                                iArr3[i9] = 3;
                                continue;
                            } else {
                                continue;
                            }
                    }
                } while (i4 != i3);
            } else if (this.BTb < 128) {
                long j2 = 1 << (this.BTb & '?');
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((-268435457 & j2) != 0) {
                                if (i5 > 11) {
                                    i5 = 11;
                                }
                                axp(2);
                                continue;
                            } else if (this.BTb == '\\') {
                                axp(1);
                                continue;
                            } else {
                                continue;
                            }
                        case 1:
                            if (i5 > 10) {
                                i5 = 10;
                            }
                            axp(1);
                            continue;
                        case 2:
                            if ((-268435457 & j2) == 0) {
                                continue;
                            } else {
                                if (i5 > 11) {
                                    i5 = 11;
                                }
                                axp(2);
                                continue;
                            }
                    }
                } while (i4 != i3);
            } else {
                int i10 = (this.BTb & 255) >> 6;
                long j3 = 1 << (this.BTb & '?');
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                        case 2:
                            if ((BSM[i10] & j3) == 0) {
                                continue;
                            } else {
                                if (i5 > 11) {
                                    i5 = 11;
                                }
                                axp(2);
                                continue;
                            }
                        case 1:
                            if ((BSM[i10] & j3) == 0) {
                                continue;
                            } else {
                                if (i5 > 10) {
                                    i5 = 10;
                                }
                                int[] iArr4 = this.BSX;
                                int i11 = this.BTe;
                                this.BTe = i11 + 1;
                                iArr4[i11] = 1;
                                continue;
                            }
                    }
                } while (i4 != i3);
            }
            if (i5 != Integer.MAX_VALUE) {
                this.BTh = i5;
                this.BTg = i2;
                i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
            }
            i2++;
            i4 = this.BTe;
            this.BTe = i3;
            i3 = 6 - i3;
            if (i4 != i3) {
                try {
                    this.BTb = this.BUr.readChar();
                } catch (IOException e) {
                }
            }
            return i2;
        }
    }

    private final int ny(int i, int i2) {
        int i3 = 0;
        this.BTe = 3;
        int i4 = 1;
        this.BSX[0] = 0;
        int i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
        while (true) {
            int i6 = this.BTf + 1;
            this.BTf = i6;
            if (i6 == Integer.MAX_VALUE) {
                gUB();
            }
            if (this.BTb < '@') {
                long j = 1 << this.BTb;
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((-3298534883329L & j) != 0 && i5 > 8) {
                                i5 = 8;
                                continue;
                            }
                        case 1:
                            if (i5 > 7) {
                                i5 = 7;
                            }
                            int[] iArr = this.BSX;
                            int i7 = this.BTe;
                            this.BTe = i7 + 1;
                            iArr[i7] = 1;
                            continue;
                    }
                } while (i4 != i3);
            } else if (this.BTb < 128) {
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if (i5 > 8) {
                                i5 = 8;
                            }
                            if (this.BTb == '\\') {
                                axp(1);
                                continue;
                            } else {
                                continue;
                            }
                        case 1:
                            if (i5 > 7) {
                                i5 = 7;
                            }
                            axp(1);
                            continue;
                        case 2:
                            if (i5 > 8) {
                                i5 = 8;
                                continue;
                            } else {
                                continue;
                            }
                    }
                } while (i4 != i3);
            } else {
                int i8 = (this.BTb & 255) >> 6;
                long j2 = 1 << (this.BTb & '?');
                do {
                    i4--;
                    switch (this.BSX[i4]) {
                        case 0:
                            if ((BSM[i8] & j2) != 0 && i5 > 8) {
                                i5 = 8;
                                continue;
                            }
                        case 1:
                            if ((BSM[i8] & j2) == 0) {
                                continue;
                            } else {
                                if (i5 > 7) {
                                    i5 = 7;
                                }
                                int[] iArr2 = this.BSX;
                                int i9 = this.BTe;
                                this.BTe = i9 + 1;
                                iArr2[i9] = 1;
                                continue;
                            }
                    }
                } while (i4 != i3);
            }
            if (i5 != Integer.MAX_VALUE) {
                this.BTh = i5;
                this.BTg = i2;
                i5 = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
            }
            i2++;
            i4 = this.BTe;
            this.BTe = i3;
            i3 = 3 - i3;
            if (i4 != i3) {
                try {
                    this.BTb = this.BUr.readChar();
                } catch (IOException e) {
                }
            }
            return i2;
        }
    }

    public final aaeg gUU() {
        String str;
        boolean z;
        int i = 0;
        while (true) {
            try {
                this.BTb = this.BUr.gUR();
                this.BSY = null;
                this.BSZ = 0;
                while (true) {
                    switch (this.BTc) {
                        case 0:
                            this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
                            this.BTg = 0;
                            switch (this.BTb) {
                                case '\"':
                                    i = nu(0, 9);
                                    break;
                                case '(':
                                    i = nu(0, 1);
                                    break;
                                default:
                                    i = nv(2, 0);
                                    break;
                            }
                        case 1:
                            this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
                            this.BTg = 0;
                            switch (this.BTb) {
                                case '(':
                                    i = nu(0, 3);
                                    break;
                                case ')':
                                    i = nu(0, 2);
                                    break;
                                default:
                                    i = nw(0, 0);
                                    break;
                            }
                        case 2:
                            this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
                            this.BTg = 0;
                            switch (this.BTb) {
                                case '(':
                                    i = nu(0, 5);
                                    break;
                                case ')':
                                    i = nu(0, 6);
                                    break;
                                default:
                                    i = ny(0, 0);
                                    break;
                            }
                        case 3:
                            this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
                            this.BTg = 0;
                            switch (this.BTb) {
                                case '\"':
                                    i = nu(0, 13);
                                    break;
                                default:
                                    i = nx(0, 0);
                                    break;
                            }
                    }
                    if (this.BTh != Integer.MAX_VALUE) {
                        if (this.BTg + 1 < i) {
                            this.BUr.axr((i - this.BTg) - 1);
                        }
                        if ((BSR[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) {
                            aaeg gUT = gUT();
                            switch (this.BTh) {
                                case 13:
                                    if (this.BSY == null) {
                                        this.BSY = new StringBuffer();
                                    }
                                    StringBuffer stringBuffer = this.BSY;
                                    aaec aaec = this.BUr;
                                    int i2 = this.BSZ;
                                    int i3 = this.BTg + 1;
                                    this.BTa = i3;
                                    stringBuffer.append(aaec.axs(i2 + i3));
                                    gUT.image = this.BSY.substring(0, this.BSY.length() - 1);
                                    break;
                            }
                            if (BSQ[this.BTh] == -1) {
                                return gUT;
                            }
                            this.BTc = BSQ[this.BTh];
                            return gUT;
                        } else if ((BSS[this.BTh >> 6] & (1 << (this.BTh & 63))) != 0) {
                            switch (this.BTh) {
                                case 3:
                                    if (this.BSY == null) {
                                        this.BSY = new StringBuffer();
                                    }
                                    StringBuffer stringBuffer2 = this.BSY;
                                    aaec aaec2 = this.BUr;
                                    int i4 = this.BSZ;
                                    int i5 = this.BTg + 1;
                                    this.BTa = i5;
                                    stringBuffer2.append(aaec2.axs(i4 + i5));
                                    this.BSK = 1;
                                    break;
                                case 5:
                                    if (this.BSY == null) {
                                        this.BSY = new StringBuffer();
                                    }
                                    StringBuffer stringBuffer3 = this.BSY;
                                    aaec aaec3 = this.BUr;
                                    int i6 = this.BSZ;
                                    int i7 = this.BTg + 1;
                                    this.BTa = i7;
                                    stringBuffer3.append(aaec3.axs(i6 + i7));
                                    this.BSK++;
                                    System.out.println("+++ COMMENT NEST=" + this.BSK);
                                    break;
                                case 6:
                                    if (this.BSY == null) {
                                        this.BSY = new StringBuffer();
                                    }
                                    StringBuffer stringBuffer4 = this.BSY;
                                    aaec aaec4 = this.BUr;
                                    int i8 = this.BSZ;
                                    int i9 = this.BTg + 1;
                                    this.BTa = i9;
                                    stringBuffer4.append(aaec4.axs(i8 + i9));
                                    this.BSK--;
                                    System.out.println("+++ COMMENT NEST=" + this.BSK);
                                    if (this.BSK == 0) {
                                        axq(1);
                                        break;
                                    }
                                    break;
                                case 7:
                                    if (this.BSY == null) {
                                        this.BSY = new StringBuffer();
                                    }
                                    StringBuffer stringBuffer5 = this.BSY;
                                    aaec aaec5 = this.BUr;
                                    int i10 = this.BSZ;
                                    int i11 = this.BTg + 1;
                                    this.BTa = i11;
                                    stringBuffer5.append(aaec5.axs(i10 + i11));
                                    this.BSY.deleteCharAt(this.BSY.length() - 2);
                                    break;
                            }
                            if (BSQ[this.BTh] != -1) {
                                this.BTc = BSQ[this.BTh];
                            }
                        } else {
                            int i12 = this.BSZ;
                            int i13 = this.BTg + 1;
                            this.BTa = i13;
                            this.BSZ = i12 + i13;
                            switch (this.BTh) {
                                case 10:
                                    if (this.BSY == null) {
                                        this.BSY = new StringBuffer();
                                    }
                                    this.BSY.append(this.BUr.axs(this.BSZ));
                                    this.BSZ = 0;
                                    this.BSY.deleteCharAt(this.BSY.length() - 2);
                                    break;
                            }
                            if (BSQ[this.BTh] != -1) {
                                this.BTc = BSQ[this.BTh];
                            }
                            this.BTh = MoPubNativeAdPositioning.MoPubClientPositioning.NO_REPEAT;
                            try {
                                this.BTb = this.BUr.readChar();
                                i = 0;
                            } catch (IOException e) {
                                i = 0;
                            }
                        }
                    }
                }
            } catch (IOException e2) {
                this.BTh = 0;
                return gUT();
            }
        }
        int gUF = this.BUr.gUF();
        int gUE = this.BUr.gUE();
        try {
            this.BUr.readChar();
            this.BUr.axr(1);
            str = null;
            z = false;
        } catch (IOException e3) {
            String gUI = i <= 1 ? "" : this.BUr.gUI();
            if (this.BTb == '\n' || this.BTb == '\r') {
                gUF++;
                str = gUI;
                gUE = 0;
                z = true;
            } else {
                gUE++;
                str = gUI;
                z = true;
            }
        }
        if (!z) {
            this.BUr.axr(1);
            str = i <= 1 ? "" : this.BUr.gUI();
        }
        throw new aaeh(z, this.BTc, gUF, gUE, str, this.BTb, 0);
    }
}